<?php

class Cms_Model_XtensionDescriptor extends SimpleXMLElement
{

	/**
	 * Lese die Definitionen fuer die Controllers aus und gib ein Array zurueck.
	 *
	 * @return array
	 */
	public function getControllers()
	{
        $controllers = array();
        if($this->controllers) {
	        foreach($this->controllers->children() AS $controller) {
    	    	$controllers[] = array(
    	    		'key' => strval($controller->key),
    	    		'class' => strval($controller->class),
    	    		'label' => strval($controller->label),
    	    		'description' => strval($controller->description)
    	    	);
        	}
        }
        return $controllers;
	}

}